import z from "zod";

const RequestSchemas = {
    request: z.object({
        body: z.object({
            contactId: z.string().regex(/^\d+$/),
            isGroup: z.boolean(),
            message: z.string().min(1).max(1000)
        })
    }),
    update: z.object({
        body: z.object({
            id: z.number(),
            status: z.enum(['ACCEPTED', 'REJECTED'])
        })
    })
}

export type RequestInput = z.infer<typeof RequestSchemas.request>['body'];
export type UpdateRequestInput = z.infer<typeof RequestSchemas.update>['body'];
export default RequestSchemas;